package com.orhon.smartcampus.modules.student.mm;



import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.student.entity.Rewards;
import com.orhon.smartcampus.modules.student.gqlModel.GQLRewards;

@Mapper(
        uses = {
                LangMapper.class
        }
)
public interface RewardsMapper {


    RewardsMapper MAPPER = Mappers.getMapper(RewardsMapper.class);


    @Mapping(source = "id",target = "id")
    @Mapping(source = "student_id",target = "student_id")
    @Mapping(source = "discipline_name",target = "discipline_name")
    @Mapping(source = "grade",target = "grade")
    @Mapping(source = "user_name",target = "user_name")
    @Mapping(source = "status",target = "status")
    @Mapping(source = "remarks",target = "remarks")
    @Mapping(source = "created_at",target = "created_at")
    @Mapping(source = "updated_at",target = "updated_at")
    @Mapping(source = "deleted_at",target = "deleted_at")
    GQLRewards toRewards(Rewards entity);
    
    @InheritConfiguration(name = "toRewards")
    List<GQLRewards> toRewardsList(List<Rewards> entities);
}
